home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
basic
/
vbhelp.exe
/
HELPF.FRM
< prev
next >
Wrap
Text File
|
1993-02-09
|
25KB
|
698 lines
Version 1.00
BEGIN Form frmHelpMain
AutoRedraw = -1
BackColor = QBColor(7)
BorderStyle = 2
Caption = "Help"
ControlBox = -1
Enabled = -1
ForeColor = QBColor(0)
Height = Char(19)
Left = Char(7)
MaxButton = -1
MinButton = -1
MousePointer = 0
Tag = ""
Top = Char(2)
Visible = -1
Width = Char(66)
WindowState = 0
BEGIN HScrollBar hscHelp
Attached = -1
DragMode = 0
Enabled = -1
Height = Char(1)
LargeChange = 20
Left = Char(8)
Max = 32767
Min = 1
MousePointer = 0
SmallChange = 1
TabIndex = 6
TabStop = 0
Tag = ""
Top = Char(20)
Value = 1
Visible = -1
Width = Char(63)
END
BEGIN VScrollBar vscHelp
Attached = -1
DragMode = 0
Enabled = -1
Height = Char(16)
LargeChange = 1
Left = Char(72)
Max = 32767
Min = 1
MousePointer = 0
SmallChange = 1
TabIndex = 7
TabStop = 0
Tag = ""
Top = Char(3)
Value = 1
Visible = -1
Width = Char(1)
END
BEGIN PictureBox pctBackground
AutoRedraw = -1
BackColor = QBColor(7)
BorderStyle = 0
DragMode = 0
Enabled = -1
ForeColor = QBColor(0)
Height = Char(14)
Left = Char(0)
MousePointer = 0
TabIndex = 0
TabStop = -1
Tag = ""
Top = Char(3)
Visible = -1
Width = Char(64)
END
BEGIN CommandButton cmdButtonBar
BackColor = QBColor(7)
Cancel = 0
Caption = "&Contents"
Default = 0
DragMode = 0
Enabled = 0
Height = Char(3)
Index = 0
Left = Char(0)
MousePointer = 0
TabIndex = 1
TabStop = 0
Tag = ""
Top = Char(0)
Visible = -1
Width = Char(12)
END
BEGIN CommandButton cmdButtonBar
BackColor = QBColor(7)
Cancel = 0
Caption = "&Search..."
Default = 0
DragMode = 0
Enabled = 0
Height = Char(3)
Index = 1
Left = Char(13)
MousePointer = 0
TabIndex = 2
TabStop = 0
Tag = ""
Top = Char(0)
Visible = -1
Width = Char(12)
END
BEGIN CommandButton cmdButtonBar
BackColor = QBColor(7)
Cancel = 0
Caption = "&Back"
Default = 0
DragMode = 0
Enabled = 0
Height = Char(3)
Index = 2
Left = Char(26)
MousePointer = 0
TabIndex = 3
TabStop = 0
Tag = ""
Top = Char(0)
Visible = -1
Width = Char(12)
END
BEGIN CommandButton cmdButtonBar
BackColor = QBColor(7)
Cancel = 0
Caption = "His&tory..."
Default = 0
DragMode = 0
Enabled = 0
Height = Char(3)
Index = 3
Left = Char(39)
MousePointer = 0
TabIndex = 4
TabStop = 0
Tag = ""
Top = Char(0)
Visible = -1
Width = Char(12)
END
BEGIN CommandButton cmdButtonBar
BackColor = QBColor(7)
Cancel = 0
Caption = "Co&py..."
Default = 0
DragMode = 0
Enabled = -1
Height = Char(3)
Index = 4
Left = Char(52)
MousePointer = 0
TabIndex = 5
TabStop = 0
Tag = ""
Top = Char(0)
Visible = -1
Width = Char(12)
END
END
' ------------------------------------------------------------------------
' Visual Basic for MS-DOS Help Toolkit
'
' Help Window Form
'
' The Help Toolkit (HELP.BAS, HELPF.FRM, and HELPUTIL.FRM)
' makes it easy to add a hypertext Help system to your
' applications.
'
' To use the Help Toolkit in your programs, include
' HELP.BAS, HELPF.FRM, and HELPUTIL.FRM in your program or
' use the supplied library (HELP.LIB, HELPA.LIB - AltMath
' version) and Quick library (HELP.QLB) and call the
' appropriate routines to load and display your help topics.
' Forms and code modules that call Help routines
' must include HELP.BI ('$INCLUDE: 'HELP.BI').'
'
' Refer to the module level comments in HELP.BAS for
' more information on using the Help Toolkit.
'
' Copyright (C) 1982-1992 Microsoft Corporation
'
' You have a royalty-free right to use, modify, reproduce
' and distribute the sample applications and toolkits provided with
' Visual Basic for MS-DOS (and/or any modified version)
' in any way you find useful, provided that you agree that
' Microsoft has no warranty, obligations or liability for
' any of the sample applications or toolkits.
' ------------------------------------------------------------------------
' Include file containing procedure declarations.
'$INCLUDE: 'HELP.BI'
'$FORM frmHelpUtils ' Form for Search, History, and Change dialogs
TYPE IndexType ' Used to index Help topics
StartFilePtr AS LONG ' Position within the topic's file
NumLines AS INTEGER ' Number of lines in the Help topic
END TYPE
TYPE PointType
X AS INTEGER ' Horizontal location
Y AS INTEGER ' Vertical location
END TYPE
' Variables common to HELP.BAS, HELPF.FRM, and HELPUTIL.FRM.
COMMON SHARED /HelpLib/ DialogBackcolor AS INTEGER ' Background color for Help dialog boxes (Search, Copy, History)
COMMON SHARED /HelpLib/ DialogForecolor AS INTEGER ' Foreground color for Help dialog boxes (Search, Copy, History)
' Variables common to HELP.BAS and HELPF.FRM.
COMMON SHARED /HelpLib/ Topic() AS STRING ' Lines of the current Help topic
COMMON SHARED /HelpLib/ LeftChar AS INTEGER ' Leftmost character of the Help topic given the horizonal scroll position
COMMON SHARED /HelpLib/ StartLine AS INTEGER ' Top line of the Help topic given the vertical scroll position
COMMON SHARED /HelpLib/ MaxLineLen AS INTEGER ' Longest line of the Help topic
COMMON SHARED /HelpLib/ HelpIndexPtr() AS IndexType ' Table that stores data about each Help topic
COMMON SHARED /HelpLib/ HelpIndexTopics() AS STRING ' Array of Help topic names. Used with the HelpIndexPtr table.
COMMON SHARED /HelpLib/ HelpFileNum AS INTEGER ' Logical file number assigned to the Help file by HelpRegister
COMMON SHARED /HelpLib/ HelpTopicStack() AS STRING ' Array of the last 20 Help topics shown
COMMON SHARED /HelpLib/ HelpTopicStackPtr AS INTEGER ' Number of topics in the HelpTopicStack
COMMON SHARED /HelpLib/ TopicFound AS STRING ' The Help topic being shown
COMMON SHARED /HelpLib/ MaxHistoryStack AS INTEGER ' Maximum allowed size of the HelpTopicStack. HelpRegister sets to 20.
COMMON SHARED /HelpLib/ UnloadOnClose AS INTEGER ' Flag that determines if closing the Help form terminates the Help system.
COMMON SHARED /HelpLib/ KillHelp AS INTEGER ' Flag that HelpClose sets to terminate the Help form
COMMON SHARED /HelpLib/ CursorPos AS PointType ' Position of the currently selected Help link within a topic
COMMON SHARED /HelpLib/ ButtonBarHeight AS INTEGER ' Number of lines to reserve at the top of the form for the button bar. 0 or 3.
COMMON SHARED /HelpLib/ CloseOnEscape AS INTEGER ' If TRUE, pressing ESC will close the Help window
DEFINT A-Z
CONST StartChar = ""
CONST EndChar = ""
CONST FALSE = 0
CONST TRUE = NOT FALSE
' Click event procedure for the button bar command buttons (control array)..
' Invokes appropriate action when user clicks one of the buttons.
SUB cmdButtonBar_Click (index AS INTEGER)
SELECT CASE index
CASE 0 ' Contents button
pctBackground.SETFOCUS
HelpShowTopic "Contents"
CASE 1 ' Search button
HelpSearch
CASE 2 ' Back button
HelpTopicStackPtr = HelpTopicStackPtr - 2
pctBackground.SETFOCUS
HelpShowTopic HelpTopicStack(HelpTopicStackPtr + 1)
CASE 3 ' History button
FOR i = HelpTopicStackPtr TO 1 STEP -1
frmHelpUtil